{% extends "base.html" %}
{% load static %}

{% block etaf_body %}
<style>
    .etaf_body {
        background-image: url({% static 'weiAA_app/img/bg.jpg' %} );
    }

    .etaf_pan {
        background-image: url({% static 'weiAA_app/img/left_bg.png' %} );
    }
</style>

<script type="text/javascript">
    $(document).ready(function () {

        $('#show_act_panel_a').click(function () {
            $('#act_panel_b').hide();
            $('#act_panel_a').show();
        });
        $('#show_act_panel_b').click(function () {
            $('#act_panel_a').hide();
            $('#act_panel_b').show();
        });
        $('.etaf_vote_btn').click(function(){

            if(confirm("确认投票？")){
                plan_id = $(this).attr('id');
                plan_id = plan_id.slice(9);
                vote_btn_id = '#vote_btn_'+plan_id;
                $.getJSON('/ajax_vote?plan_id='+plan_id, function(data){
                    alert(data.plan_id+"\n"+data.message);
                    $(vote_btn_id).attr('disabled','true');
                })
            }
        });

        $('.etaf_remind_join_btn').click(function(){

            member_id = $(this).attr('id');
            member_id = member_id.slice(21);

            if(confirm("再提醒一遍?")){
                $.getJSON('/ajax_remind_join?member_id='+member_id,function(data){
                    alert(data.member_id+"\n"+data.message);
                    $('#etaf_remind_join_btn_'+member_id).attr('disabled','true');
                })
            }
        })

        $('.etaf_remove_member_btn').click(function(){

            member_id = $(this).attr('id');
            member_id = member_id.slice(23);

            if(confirm("确定删除该成员？")){
                $.getJSON('/ajax_remove_member?member_id='+member_id,function(data){
                    alert(data.member_id+"\n"+data.message);
                    $('#tr_member_'+member_id).empty();
                })
            }
        })
    });
//    function act_list_2() {
//        $('#tabs-565942').hide();
//    }
</script>

<div class="etaf_body">
<div class="container">
<div class="row clearfix">
<div class="col-md-3 column " id="etaf_pan_left">

    <div class="etaf_pan">
        <div class="etaf_profile">
            <img src="{% static 'weiAA_app/img/profile.png'%}" class="img-responsive img-thumbnail"
                 alt="Responsive image">
        </div>
        <div class="etaf_remind_text">
            <br/>

            <div class="list-group">
                <a href="#" class="list-group-item etaf_list-group-item"> 待缴费活动：<span class="badge">1</span></a>
                <a href="#" class="list-group-item etaf_list-group-item"> 未缴费活动：<span class="badge">1</span></a>
                <a href="#" class="list-group-item etaf_list-group-item"> 收费中活动：<span class="badge">2</span></a>
                <a href="#" class="list-group-item etaf_list-group-item"> 待投票活动：<span class="badge">3</span></a>
            </div>
        </div>
        <div>
            <!--<button class="btn btn-primary btn-lg btn-block" data-toggle="modal" data-target="#create_modal" >-->
                <!--创 &nbsp;建 &nbsp; 活 &nbsp; 动&nbsp;-->
            <!--</button>-->
            <a class="btn btn-primary btn-lg btn-block"  href="create_act">
                创 &nbsp;建 &nbsp; 活 &nbsp; 动&nbsp;
            </a>

            <button type="button" class="btn btn-warning btn-lg btn-block " data-toggle="collapse"
                    data-target="#act_level1">
                活&nbsp; 动&nbsp; 列 &nbsp; 表 &nbsp;
            </button>
            <div id="act_level1" class=" collapse" style="padding-top: 3%; padding-right: 10%">
                <!--<button type="button" class="btn btn-danger  btn-block"  data-toggle="collapse" data-target="#act_list_2321" id="show_act_list_1">-->
                <button type="button" class="btn btn-danger  btn-block"  id="show_act_panel_a">
                    已创建活动
                </button>
                <!--<button type="button" class="btn btn-danger  btn-block " id="show_act_list_2" data-toggle="collapse" data-target="#act_list_3245">-->
                <button type="button" class="btn btn-danger  btn-block " id="show_act_panel_b" >
                    被邀请活动
                </button>
            </div>
        </div>

    </div>
</div>
<div class="col-md-6 column">
<div class="etaf_pan">
{% include "weiAA_app/myact.html"%}
{% include "weiAA_app/invitedact.html"%}
</div>
</div>
<div class="col-md-3 column ">
    <div class="etaf_pan">

    </div>
</div>
</div>

</div>


</div>


{% endblock %}
